<template>
	<view class="content">
		<view class="body" >
				<swiper class="swiper" :indicator-dots="true" :autoplay="autoplay" :interval="interval" :duration="duration" style="background-color: white;">
					      <swiper-item >
					         <image  style="height: 100%; width: 100%;"   src="https://img1.baidu.com/it/u=427625536,3647903481&fm=26&fmt=auto&gp=0.jpg"></image>
					      </swiper-item>
					      <swiper-item style="background-color: white; ">
					         <image style="height: 100%; width: 100%;" src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimage.thepaper.cn%2Fwww%2Fimage%2F30%2F950%2F266.jpg&refer=http%3A%2F%2Fimage.thepaper.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1628837813&t=feb61296acb2b49a0e7ac31088ddcba7"></image>
					      </swiper-item>
					 </swiper>
		</view>
		<view class="function">
			<text> 辅助功能</text>
				
				 <view  class="function1">
					 <text class="cuIcon-notificationforbidfill lg text-gray"></text>
					 <text>禁言</text>
					 <input placeholder="用户名" v-model="sing"/>
					<button @click="ban" class="cu-btn round line-green" style="margin-left: 3%;">禁言</button>
				 </view>
				 <view  class="function2">
					 <text class="cuIcon-delete lg text-gray"></text>
				 <text>删除帖子</text>
				 <input placeholder="帖子名" v-model="deletee"/>
				 <button @click="shanchu()" class="cu-btn round line-green" style="margin-left: 3%;">删除</button>
				 
			 </view>
			 <view  class="function3">
				 <text class="cuIcon-backdelete lg text-gray"></text>
				 <text>封禁账号</text>
				 <input placeholder="账号" v-model="searchsaa"/>
				 <button @click="sousuo()" class="cu-btn round line-green" style="margin-left: 3%;">封禁</button>
			 </view>
		</view>
		<view class="creater">
			<image mode="widthFix"  src="https://img2.baidu.com/it/u=3081852834,310997741&fm=26&fmt=auto&gp=0.jpg">
			</image>
			
		</view>
	</view>
</template>
<script>
	export default {
		
		data() {
			return{
				sing:"",
				deletee:"",
				searchsaa: "",
				numberr:"541033895",
				namee:"lol",
				family:"胡心诚"
			} 
		},
		onLoad() {
			uni.request({
				url:"",
				method:"GET",
				data:{

				},
				success: (res) => {
					console.log("yes")
					
				}
				
			}),
			uni.showToast({
				title:"进入管理员界面",
				success: () => {
					console.log("yes")
				},
				fail: () => {
					console.log("no")
				}
			})
			
		},
		methods: {
			 ban(){
				 if(this.sing==this.family){
				 					  console.log("yes")
				 					  uni.showToast({
				 					  	title:"禁言成功"
				 					  })
				 					  this.sing=""
				 }
				 else if(this.sing==""){
				 					   uni.showToast({
										icon:"none",	
				 					   	title:"请输入账号"
				 						
				 						
				 					   })
				 }
				 else{
				 					   console.log("no");
				 					   uni.showToast({
										icon:"none",
				 					   	title:"没有该用户"
				 					   })
				 }
			 },
               sousuo(){
				   if(this.searchsaa==this.numberr){
					  console.log("yes")
					  uni.showToast({
					  	title:"封禁成功"
					  })
					  this.searchsaa=""
				   }
				   else if(this.searchsaa==""){
				   					   uni.showToast({
										   icon:"none",
				   					   	title:"请输入账号"
				   						
				   						
				   					   })
				   }
				   else{
					   console.log("no");
					   uni.showToast({
						   icon:"none",
					   	title:"没有该用户"
					   })
				   }
			   },
			   shanchu(){
				   if(this.deletee==this.namee)
				   {
					   console.log("yes")
					   uni.showToast({
					   	title:"删除成功"
					   })
					   this.deletee=""
				   }
				   else if(this.deletee==""){
					   uni.showToast({
						   icon:"none",
					   	title:"请输入帖子名"
							
						
					   })
				   }
				   else{
					   console.log("no")
					   uni.showToast({
						   icon:"none",
					   	title:"没有该帖子"
					   })
				   }
			   }
			   
			   
			   
		}
	}
</script>

<style>
	.header-1{
		width: 30%;
		height: 100%;
		float: right;
	    
	}
	.header-1 navigator{
		display: flex;
	}
	.header-left-content{
		float: right;
		margin: 0px;
		padding: 0px;
		padding-right: 0px;
		margin-right: 0px;
		margin-top: 0px;
	}
	.header-2{
		padding: 30rpx;
		width: 40%;
		height: 100%;
		float: right;
		text-align: center;
		font-size: 15px;
	}

	.header{
		width: 100%;
		height: 30%;
		
		
	}
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
	.body{
		width: 100%;
		height: 350upx;
		margin: 0upx;
		padding: 0upx;
		
	}
	.body swiper{
		width: 100%;
		height: 100%;
		margin: 0upx;
		padding: 0upx;
	}
	.function{
		margin-left: 0;
		margin-top: 15upx;
		width: 100%;
		height: 40%;		
		border-radius: 20px;
		border-color: white;
	}
	.function text{
		height: 50upx;
		font-size: 50upx;
		color: black;
		margin-bottom: 10upx;
		margin-left:40upx;
		align-items: center;
		
	}
	.function1 input{
		border-radius: 15upx;
		background-color: white;
		display: block;
		width: 300upx;
		margin-left: 80upx;
	}
	.function2 input{
		border-radius: 15upx;
		background-color: white;
		display: block;
		width: 300upx;
	}
	.function3 input{
		border-radius: 15upx;
		background-color: white;
		display: block;
		width: 300upx;	
	}
	.function1{
		align-items: center;
		display: flex;
		height:50upx ;
		width: 100%;
		margin-top: 5%;
	}
	.function1 text{
		font-size: 40upx;
		align-content: center;
	}
	.function2{
	    display: flex;
		height:50upx ;
		width: 100%;
		margin-top: 5%;
	}
	.function2 text{
		font-size: 40upx;
		align-content: center;
	}
	.function3{
		height:50upx ;
		width: 100%;
		margin-top: 5%;
		display: flex;
		
	}
	.function3 text{
		font-size: 40upx;
		align-content: center;
	}
	.creater{
		padding-top: 10%;
		height: 30%;
		width: 80%;
		margin-left: 3%;
	}
	.creater-content{
		float: right;
		color: red;
	}
	
</style>
